package main

import (
	"encoding/json"
	"fmt"
)

type Users struct {
	Name string `json:"name"`
	Age  int
	Sex  string
}

func main() {
	var a int = 10
	b := &a

	fmt.Printf("变量的地址: %x\n", &a)
	fmt.Println(&a)
	fmt.Println(b)
	newUser := Users{
		Name: "test",
		Age:  10,
		Sex:  "男",
	}
	fmt.Println(newUser)
	marshal, _ := json.Marshal(newUser)
	fmt.Println(string(marshal))

	var tempUser = new(Users)
	json.Unmarshal([]byte(marshal), &tempUser)

}
